package com.example.testservicce.service;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;

public class MyBindService extends Service {
    public MyBindService() {
    }
    public class Agency extends Binder{
        public void work(){
            Log.i("MyBindService", "funtionInService: call服务中的方法");
            //
            funtionInService();
        }

    }

    @Override
    public IBinder onBind(Intent intent) {
        // TODO: Return the communication channel to the service.
        return  new Agency();
    }

    public void funtionInService(){
        //
        Log.i("MyBindService", "funtionInService: 执行服务中的方法");
    }
}
